1 //------------------------------------------------------------------------------
2 // <copyright file="TkNative.cs" company="Microsoft">
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
11 // You must not remove this notice, or any other, from this software.
14 //------------------------------------------------------------------------------
17 using System
.Runtime
.InteropServices
;
19 namespace SharedSourceCLI
.TK
21 internal unsafe class TkNative
{
24 internal const String DLLPREFIX
= "";
25 internal const String DLLSUFFIX
= ".dll";
26 internal const String DLLNAME
= "tk84";
27 #else // !PLATFORM_UNIX
28 internal const String DLLPREFIX
= "lib";
29 internal const String DLLNAME
= "tk8.4";
31 internal const String DLLSUFFIX
= ".dylib";
33 internal const String DLLSUFFIX
= ".so";
35 #endif // !PLATFORM_UNIX
37 internal const String TK_LIB
= DLLPREFIX
+ DLLNAME
+ DLLSUFFIX
;
39 [DllImport(TK_LIB
, EntryPoint
="Tk_Init", CallingConvention
=CallingConvention
.Cdecl
)]
40 internal static extern int Tk_Init(Tcl_Interp
* interp
);
42 [DllImport(TK_LIB
, EntryPoint
="Tk_MainEx", CallingConvention
=CallingConvention
.Cdecl
)]
43 internal static extern void Tk_MainEx(int argc
, [In
, MarshalAs(UnmanagedType
.LPArray
)] string[] argv
,
44 Tcl_AppInitProc appInitProc
, Tcl_Interp
* interp
);